package com.qing.springbootinit.config;

import io.github.briqt.spark4j.SparkClient;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

// * @author <a href="https://github.com/qingfengzy">qingfengzy</a>

@Configuration
@Data
@ConfigurationProperties(prefix = "xun-fei.client")
public class XingHuoConfig {
    private String appId;
    private String apiSecret;

    private String apiKey;

    @Bean
    public SparkClient speakClient(){
        SparkClient speckClient = new SparkClient();
        speckClient.appid = appId;
        speckClient.apiSecret = apiSecret;
        speckClient.apiKey = apiKey;

        return speckClient;
    }
}
